home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / a_man / cat1 / dd.z / dd
Encoding:
Text File  |  1998-10-20  |  10.1 KB  |  199 lines

  1.  
  2.  
  3.  
  4. dddddddd((((1111MMMM))))                                                                  dddddddd((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _dddd_dddd - convert and copy a file
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _dddd_dddd [option_====value] ...
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      _dddd_dddd copies the specified input file to the specified output with possible
  16.      conversions.  The standard input and output are used by default.  The
  17.      input and output block sizes can be specified to take advantage of raw
  18.      physical I/O.  _dddd_dddd processes supplementary code-set characters according
  19.      to the locale specified in the LC_CTYPE environment variable (see LANG in
  20.      _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5)), except as noted below.
  21.  
  22.      Option         Values
  23.  
  24.      _iiii_ffff_====_f_i_l_e        Input filename; standard input is default.
  25.  
  26.      _oooo_ffff_====_f_i_l_e        Output filename; standard output is default.
  27.  
  28.      _iiii_bbbb_ssss_====_n          Input block size is _n bytes (default 512).
  29.  
  30.      _oooo_bbbb_ssss_====_n          Output block size is _n bytes (default 512).
  31.  
  32.      _bbbb_ssss_====_n           Set both input and output block size, superseding _i_b_s and
  33.                     _o_b_s.  Also, if no conversion is specified, preserve the
  34.                     input block size instead of packing short blocks into the
  35.                     output buffer (this is particularly efficient since no
  36.                     in-core copy need be done).
  37.  
  38.      _cccc_bbbb_ssss_====_n          Conversion buffer size (logical record length).
  39.  
  40.      _ffff_iiii_llll_eeee_ssss_====_n        Copy and concatenate _n input files before terminating
  41.                     (makes sense only where input is a magnetic tape or
  42.                     similar device).
  43.  
  44.      _ssss_kkkk_iiii_pppp_====_n         Skip _n input blocks before starting copy (appropriate for
  45.                     magnetic tape, where _i_s_e_e_k is undefined).
  46.  
  47.      _iiii_ssss_eeee_eeee_kkkk_====_n        Seek _n blocks from beginning of input file before copying
  48.                     (appropriate for disk files, where _s_k_i_p can be slow).
  49.  
  50.      _oooo_ssss_eeee_eeee_kkkk_====_n        Seek _n blocks from beginning of output file before
  51.                     copying.  Preserves the contents (over the range of the
  52.                     seek) of a previously existing output file.
  53.  
  54.      _ssss_eeee_eeee_kkkk_====_n         Identical to _o_s_e_e_k, retained for backward compatibility.
  55.  
  56.      _cccc_oooo_uuuu_nnnn_tttt_====_n        Copy only _n input blocks.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. dddddddd((((1111MMMM))))                                                                  dddddddd((((1111MMMM))))
  71.  
  72.  
  73.  
  74.      _cccc_oooo_nnnn_vvvv_====_aaaa_ssss_cccc_iiii_iiii     Convert EBCDIC to ASCII.  Conversion results cannot be
  75.                     assured when supplementary code-set characters are also
  76.                     subject to conversion.
  77.  
  78.           _eeee_bbbb_cccc_dddd_iiii_cccc    Convert ASCII to EBCDIC.  Conversion results cannot be
  79.                     assured when supplementary code-set characters are also
  80.                     subject to conversion.
  81.  
  82.           _iiii_bbbb_mmmm       Slightly different map of ASCII to EBCDIC.  Conversion
  83.                     results cannot be assured when supplementary code-set
  84.                     characters are also subject to conversion.
  85.  
  86.      _cccc_oooo_nnnn_vvvv_====_bbbb_llll_oooo_cccc_kkkk     Convert newline-terminated ASCII records to fixed length.
  87.  
  88.           _uuuu_nnnn_bbbb_llll_oooo_cccc_kkkk   Convert fixed-length ASCII records to newline-terminated
  89.                     records.
  90.  
  91.           _llll_cccc_aaaa_ssss_eeee     Map alphabetics to lowercase.  Multibyte characters are
  92.                     not converted.
  93.  
  94.           _uuuu_cccc_aaaa_ssss_eeee     Map alphabetics to uppercase.  Multibyte characters are
  95.                     not converted.
  96.  
  97.           _ssss_wwww_aaaa_bbbb      Swap every pair of bytes.
  98.  
  99.           _nnnn_oooo_eeee_rrrr_rrrr_oooo_rrrr   Do not stop processing on an error (limit of five
  100.                     consecutive errors).  A message is printed on each input
  101.                     error, giving the statistics up to that point.
  102.  
  103.           _iiii_gggg_nnnn_eeee_rrrr_rrrr_oooo_rrrr  Do not stop processing on an error at all.  Unlike
  104.                     _nnnn_oooo_eeee_rrrr_rrrr_oooo_rrrr, the read errors are skipped over if possible, by
  105.                     using _l_s_e_e_k_6_4(2), (if possible) and there is no limit on
  106.                     the number of errors.  It is recommended that either _iiii_bbbb_ssss
  107.                     or _bbbb_ssss be used, and set to the minimum size for the input
  108.                     device, in order to minimize the skipped data.  This can
  109.                     sometimes allow disk drives to be copied even if they
  110.                     contain unreadable blocks, although the output copy will
  111.                     of course have blocks of missing (zero-filled) data.
  112.  
  113.           _nnnn_oooo_tttt_rrrr_uuuu_nnnn_cccc   Do not truncate a pre-existing output file.
  114.  
  115.           _ssss_yyyy_nnnn_cccc      Pad every input block to _i_b_s.  Pad with spaces if
  116.                     conv=block or conv=unblock is specified, otherwise pad
  117.                     with nulls.
  118.  
  119.           _...._...._...._,,,, _...._...._....  several comma-separated conversions.
  120.  
  121.      Where sizes are specified, a number of bytes is expected.  A number can
  122.      end with _kkkk, _bbbb, or _wwww to specify multiplication by 1024, 512, or 2,
  123.      respectively; a pair of numbers can be separated by _xxxx to indicate
  124.      multiplication.
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. dddddddd((((1111MMMM))))                                                                  dddddddd((((1111MMMM))))
  137.  
  138.  
  139.  
  140.      _cccc_bbbb_ssss is used only if _aaaa_ssss_cccc_iiii_iiii, _uuuu_nnnn_bbbb_llll_oooo_cccc_kkkk, _eeee_bbbb_cccc_dddd_iiii_cccc, _iiii_bbbb_mmmm, or _bbbb_llll_oooo_cccc_kkkk conversion is
  141.      specified.  In the first two cases, _cccc_bbbb_ssss characters are copied into the
  142.      conversion buffer, any specified character mapping is done, trailing
  143.      blanks are trimmed, and a newline is added before sending the line to the
  144.      output.  In the latter three cases, characters are read into the
  145.      conversion buffer and blanks are added to make up an output record of
  146.      size _cccc_bbbb_ssss.  If _cccc_bbbb_ssss is unspecified or zero, the _aaaa_ssss_cccc_iiii_iiii, _eeee_bbbb_cccc_dddd_iiii_cccc, and _iiii_bbbb_mmmm
  147.      options convert the character set without changing the block structure of
  148.      the input file; the _uuuu_nnnn_bbbb_llll_oooo_cccc_kkkk and _bbbb_llll_oooo_cccc_kkkk options become a simple file copy.
  149.  
  150.      After completion, _dddd_dddd reports the number of whole and partial input and
  151.      output blocks.
  152.  
  153. EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  154.      This command reads an EBCDIC tape that is blocked ten 80-byte EBCDIC card
  155.      images per tape block into the ASCII file _x:
  156.  
  157.           _dddd_dddd _iiii_ffff_====_////_dddd_eeee_vvvv_////_rrrr_mmmm_tttt_////_0000_hhhh _oooo_ffff_====_xxxx _iiii_bbbb_ssss_====_8888_0000_0000 _oooo_bbbb_ssss_====_8888_kkkk _cccc_bbbb_ssss_====_8888_0000 _cccc_oooo_nnnn_vvvv_====_aaaa_ssss_cccc_iiii_iiii_,,,,_llll_cccc_aaaa_ssss_eeee
  158.  
  159.      Note the use of raw magnetic tape.  _dddd_dddd is especially suited to I/O on the
  160.      raw physical devices because it allows reading and writing in arbitrary
  161.      block sizes.
  162.  
  163. FFFFIIIILLLLEEEESSSS
  164.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_llll_oooo_cccc_aaaa_llll_eeee_////_l_o_c_a_l_e_////_LLLL_CCCC______MMMM_EEEE_SSSS_SSSS_AAAA_GGGG_EEEE_SSSS_////_uuuu_xxxx_cccc_oooo_rrrr_eeee_...._aaaa_bbbb_iiii
  165.                     language-specific message file (see LANG on _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5))
  166.  
  167. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  168.      cp(1), lseek64(2).
  169.  
  170. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  171.      _f_++++_p _rrrr_eeee_cccc_oooo_rrrr_dddd_ssss _iiii_nnnn_((((_oooo_uuuu_tttt_))))
  172.           numbers of full and partial blocks read(written)
  173.  
  174. NNNNOOOOTTTTEEEESSSS
  175.      Do not use _dddd_dddd to copy files between filesystems having different block
  176.      sizes.
  177.  
  178.      Using a blocked device to copy a file results in extra nulls being added
  179.      to the file to pad the final block to the block boundary.
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.